home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / Fresco / build / Unix / config / cf / sgiLib.rules < prev    next >
Text File  |  1995-07-12  |  2KB  |  69 lines

  1. XCOMM $XConsortium: sgiLib.rules,v 1.8 93/09/11 17:59:30 rws Exp $
  2.  
  3. #ifndef HasSharedLibraries
  4. #define HasSharedLibraries YES
  5. #endif
  6. #ifndef SharedDataSeparation
  7. #define SharedDataSeparation YES
  8. #endif
  9. #define SharedCodeDef -DSHAREDCODE
  10. #define SharedLibraryDef -DATTSHAREDLIB
  11. #define PositionIndependentCFlags -G 0
  12.  
  13. /*
  14.  * SharedCplusplusLibraryTarget - generate rules to create a shared C++
  15.  * library; use $(CXXLINK) instead of $(LD) in case the library needs
  16.  * global constructors to be called.
  17.  *
  18.  * Not tested yet; send any bug fixes to fresco@x.org.
  19.  */
  20. #define SharedCplusplusLibraryTarget(libname,rev,solist,down,up,need_libs) @@\
  21. AllTarget(Concat(lib,libname.so.rev))                    @@\
  22.                                     @@\
  23. Concat(lib,libname.so.rev): solist                    @@\
  24.     $(RM) $@                            @@\
  25.     $(CXXLINK) -o $@ $(SHLIBLDFLAGS) -h $@ solist need_libs        @@\
  26.     $(RM) Concat(lib,libname.so)                    @@\
  27.     $(LN) $@ Concat(lib,libname.so)                    @@\
  28.                                     @@\
  29. clean::                                    @@\
  30.     $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  31.  
  32. /*
  33.  * SharedLibraryTarget - generate rules to create a shared library;
  34.  * build it into a different name so that the we don't hose people by having
  35.  * the library gone for long periods.
  36.  */
  37. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  38. AllTarget(Concat3(lib,libname,_s))                    @@\
  39.                                     @@\
  40. Concat3(lib,libname,_s): sharedlib.o solist Concat(lib,libname.spec)    @@\
  41.     $(RM) $@ $@.a \                            @@\
  42.     && cd down \                            @@\
  43.     && mkshlib -s Concat(up/lib,libname.spec) -t up/$@ -h up/$@.a \    @@\
  44.     && ar rs up/$@.a sharedlib.o                    @@\
  45.     LinkBuildLibrary($@)                        @@\
  46.     LinkBuildLibrary($@.a)                        @@\
  47.                                     @@\
  48. clean::                                    @@\
  49.     $(RM) Concat3(lib,libname,_s) Concat3(lib,libname,_s.a)
  50.  
  51. #define SharedLibraryDataTarget(libname,rev,salist)
  52.  
  53. /*
  54.  * InstallSharedLibrary - generate rules to install the shared library.
  55.  * NOTE: file must be executable, hence "INSTBINFLAGS"
  56.  */
  57. #define    InstallSharedLibrary(libname,rev,dest)                @@\
  58. install:: Concat3(lib,libname,_s)                    @@\
  59.     MakeDir($(DESTDIR)dest)                        @@\
  60.     $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat3(lib,libname,_s.a) $(DESTDIR)dest @@\
  61.     $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat3(lib,libname,_s) $(DESTDIR)dest
  62.  
  63.  
  64. /*
  65.  * InstallSharedLibraryData - generate rules to install the shared library data
  66.  */
  67. #define    InstallSharedLibraryData(libname,rev,dest)            @@\
  68. InstallTarget(install,Concat3(lib,libname,_s.a),$(INSTLIBFLAGS),dest)
  69.